﻿using System;
using System.Data;
using System.Web.UI;
using System.Web.UI.WebControls;
using NazSoft.Framework;

public partial class UserRights : BasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }

    private void DataGridBind()
    {
        object[] objName = { "UserType", "FirstName", "LastName", "isApproved" };

        Int32 UserTypeID = Convert.ToInt32(ddUserType.SelectedValue);
        string strFirstName = txtFirstName.Text;
        string strLastName = txtLastName.Text;
        Int16 IsApproved = Convert.ToInt16(DropDownList1.SelectedValue);
        object[] objValue = {  UserTypeID, strFirstName, strLastName, IsApproved };

        SqlHelper helpclass = new SqlHelper();
        DataTable dt = helpclass.GetDataTable("spUserFilter", objName, objValue);

    }

    protected void ddUserType_DataBound(object sender, EventArgs e)
    {
        ddUserType.Items.Insert(0, new ListItem("All UserType", "0"));
    }
    protected void LoginButton_Click(object sender, ImageClickEventArgs e)
    {
        //DataGridBind();
    }
   
   
    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        HiddenField changedOrNo = e.Row.FindControl("ChangedOrNo") as HiddenField;
        CheckBox chkApproved = e.Row.FindControl("ChkApproved") as CheckBox;

        if (chkApproved != null)
            if (changedOrNo != null)
            {
                chkApproved.Attributes.Add("onclick", "javascript:SetChangeValue(" + changedOrNo.ClientID.ToString() + ")");
            }
    }
    protected void ddUserId_DataBound(object sender, EventArgs e)
    {
        ddUserId.Items.Insert(0, new ListItem("Select User", "0"));
    }
    protected void TextChanged1(object sender, EventArgs e)
    {
        ddUserId.DataBind();
    }
}

